using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class tretPlanMap : EntityTypeConfiguration<tretPlan>
    {
        public tretPlanMap()
        {
            // Primary Key
            this.HasKey(t => t.plannum);

            // Properties
            this.Property(t => t.plannum)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("tretPlan");
            this.Property(t => t.plannum).HasColumnName("plannum");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Date).HasColumnName("Date");
        }
    }
}
